<?php

?>

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .item{
            width:200px;
            height:200px;
            border:1px solid black;
        }
    </style>
</head>
<body>
    <div class="container">
<?php
    require_once("userTip.php");
    require_once("productSelect.php");

?>
<div class="products">
<?php
    foreach($productArr as $key =>$p){
        echo "<div class=\"item\" >
        <div class=\"img\" >
            <img src=\"" . $p["p_image_url"] . "\" alt=\"no image\">
        </div>
        <div class=\"desc\" >
            <div><a href=\"#\">" . $p["p_name"] . "</a></div>
            <div class=\"ac\" >
                <span class=\"p\" >￥ " . $p["p_price"] . "</span>
                <a href=\"/shop/addCart.php?pid=" . $p["p_id"] . "\" class=\"add\" >加入购物车</a>
            </div>
        </div>
    </div>";
    }
?>

</div>
        <div class="item">
            <div class="img">
                <img style="width:200px;" src="http://localhost/day05/image/Hydrangeas.jpg" alt="">
            </div>
            <div>
                <div><a href="">商品名</a></div>
                <div>
                    <span>￥ 11.90</span>
                    <a href="">加入购物车</a>
                </div>
            </div>
        </div>
    </div>
</body>
</html>